package cn.lonecloud.service.impl;

import cn.lonecloud.dao.UserDao;
import cn.lonecloud.dao.impl.UserDaoImpl;
import cn.lonecloud.model.User;
import cn.lonecloud.service.UserService;

public class UserServiceImpl implements UserService {

	UserDao userDao = new UserDaoImpl();

	@Override
	public User checkLogin(String username, String password) {
		User user = userDao.getUserByNameAndPwd(username, password);
		return user;
	}

	@Override
	public void save(User user) {
		userDao.save(user);
	}

	@Override
	public User findUserById(int id) {
		User user = userDao.findById(id);
		return user;
	}

}
